TARGET_NAME=remove_old_pkg 
all:$(TARGET_NAME)
OBJECTS=main.o arch_pkg.o vercmp.o
SRCS=main.c arch_pkg.c vercmp.c
INCS=arch_pkg.h vercmp.h

$(OBJECTS):$(SRCS) $(INCS)
	gcc -c  $(shell pkg-config --cflags --libs glib-2.0 gthread-2.0 gobject-2.0) $^ 
$(TARGET_NAME):	$(OBJECTS)
	gcc -o $@  $(shell pkg-config --cflags --libs glib-2.0 gthread-2.0 gobject-2.0) $^ 
#test_unlink:test_unlink.c
#gcc -o $@  $(shell pkg-config --cflags --libs glib-2.0 gthread-2.0 gobject-2.0) $^ 

.PHONY:clean
clean:
	-rm -f remove_old_pkg test_unlink *.o  *.h.gch
install:$(TARGET_NAME)
	install -Dm 755  $(TARGET_NAME)  $(DESTDIR)/$(TARGET_NAME)
